package com.example.demo.util;

public class MyUtils {
    public static char[][] toCharArray(String[] problem) {
        char[][] chars = new char[9][];
        for (int i = 0; i < 9; i++) {
            chars[i] = problem[i].toCharArray();
        }
        return chars;
    }

    public static String[] toString(char[][] chars) {
        String[] strs = new String[9];
        for (int i = 0; i < 9; i++) {
            strs[i] = new String(chars[i]);
        }
        return strs;
    }

    public static String[] split(String s1) {
        String[] strs = new String[9];
        for (int i = 0; i < 9; i++) {
            strs[i] = s1.substring(9 * i, 9 * i + 9);
        }
        return strs;
    }
}
